package com.quanz.ckgl.services;

import java.io.Serializable;

import org.joda.time.DateTime;

/**
 * 用户信息
 * 
 * @author James Quan
 * @version 2015年10月3日 下午11:08:31
 */
public class User implements Serializable {

	public static final int STATUS_DISABLED = 0;
	public static final int STATUS_ENABLED = 1;
	public static final int STATUS_ACCOUNT_EXPIRED = 2;
	public static final int STATUS_PASSWORD_EXPIRED = 3;
	public static final int STATUS_ACCOUNT_LOCKED = 4;

	private long id;
	private String account;
	private String password;
	private int status;
	private String name;
	private DateTime createdTime;
	private DateTime lastModified;

	public User() {
		super();
	}

	public User(User user) {
		super();
		id = user.getId();
		account = user.getAccount();
		password = user.getPassword();
		status = user.getStatus();
		name = user.getName();
		createdTime = user.getCreatedTime();
		lastModified = user.getLastModified();
	}
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * 返回用户与状态
	 * 
	 * @return
	 */
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public DateTime getCreatedTime() {
		return createdTime;
	}

	public void setCreatedTime(DateTime createdTime) {
		this.createdTime = createdTime;
	}

	public DateTime getLastModified() {
		return lastModified;
	}

	public void setLastModified(DateTime lastModified) {
		this.lastModified = lastModified;
	}
}
